package cc.mrbird.febs.system.dao;

import cc.mrbird.febs.system.domain.TShop;
import cc.mrbird.febs.system.domain.TShopTaxInfo;
import cc.mrbird.febs.system.vo.TShopVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * @author dtwei
 */
@Mapper
public interface TShopMapper extends BaseMapper<TShop> {

    IPage<TShopVO> findShopDetails(Page<TShopVO> page, @Param("shop")TShop shop, @Param("areaName") String areaName, @Param("peopleName") String peopleName);

    int countShopByAreaIds(@Param("areaIds")List<String> areaIds);

    void insertShop(@Param("shop") TShopVO shop);

    List<String> selectAllShopNames();

    List<String> selectAllShopCodes();

    void insertShopList(@Param("shops") List<TShopVO> shops);

    void updateOwnerName(@Param("rsId")Long rsId, @Param("rsName")String rsName);

    void updateOpeName(@Param("rsId")Long rsId, @Param("rsName")String rsName);

    List<TShopTaxInfo> getTaxInfo(@Param("id") Long id);
}
